import request from '@/utils/request'
import { exportMethod } from '@/utils/utils'
import * as proxy from '@/constants/proxy'

export default {
  getDictByCode(data: any) {
    return request({
      url: `/checc-api/kjsl/common/getDictByCode/${data.code}`,
      method: 'get',
    })
  },
  getProjectList() {
    return request({
      url: '/checc-api/kgptKjslTchieveSttrans/projectname',
      method: 'post',
    })
  },
  getContractList() {
    return request({
      url: '/checc-api/kgptKjslTchieveSttrans/projectname',
      method: 'post',
    })
  },

  transyear() {
    return request({
      url: '/checc-api/kgptKjslTchieveSttrans/transyear',
      method: 'post',
    })
  },
  getTotalList(data) {
    return request({
      url: '/checc-api/kgptKjslTchieveSttrans/getTotalList',
      method: 'post',
      data,
    })
  },
  unitname() {
    return request({
      url: '/checc-api/kgptKjslTchieveSttrans/unitname',
      method: 'post',
    })
  },
  projectname() {
    return request({
      url: '/checc-api/kgptKjslTchieveSttrans/projectname',
      method: 'post',
    })
  },
  // 新增
  insert(data: any) {
    return request({
      url: '/checc-api/kgptKjslTchieveDouble/insert',
      method: 'post',
      data,
    })
  },
  deleteList(params) {
    return request({
      url: '/checc-api/kgptKjslTchieveSttrans/delete',
      method: 'post',
      params,
    })
  },
}
